package com.weixin.gong.example.jdk.bean;

import org.junit.Test;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;

/**
 * Created at 2017/11/13 14:39
 *
 * @author gongweixin
 */
public class StringExample {

    @Test
    public void testSplit() {
        assertEquals("abcdefg", "abcdefg".split("C")[0]);
        assertEquals("ab", "abcdefg".split("(?i)CD")[0]);
    }

    @Test
    public void equalNull() {
        assertFalse("".equals(null));
    }
}
